home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr50
/
qbmenu10.zip
/
SAVESCRN.BI
< prev
Wrap
Text File
|
1993-06-21
|
2KB
|
52 lines
' INCLUDE file for SaveScreen Library
' by Victor Yiu
DECLARE FUNCTION Snatch% (Saved%(), StartX%, StartY%, EndX%, EndY%, Func%)
CONST Save = 1, Rest = 2
' set the length accordingly to required size
' NOTE: !!!!!! To change the size of the stack, increase or decrease
' the number in "CONST SetSTACKsize = xxx" Usually, 8000 bytes
' is enough for most applications. A whole 80x25 screen will occupy
' 4000 bytes of the stack.
CONST SetSTACKsize = 7000
' change here: ^^^^
'DIM SHARED Saved%()
DIM SHARED Saved%(1 TO (SetSTACKsize \ 2))
' Snatch is a FUNCTION. Always pass the array dimensioned in this
' include file. DO NOT ERASE OR REDIMension THE ARRAY.
' ** THE PROGRAM MAY CRASH! **
'
' At the beginning of your program, you must initialize SNATCH. Do so
' by calling it like this:
'
' Dummy = Snatch (Saved%(), 0, 0, 0, 0, 0)
' If you want to adjust the number of screensaves possible from the default
' 10, then replace the 1st 0 with it. If the display being used is a
' monocrome VGA, then replace the 2nd "0" with any other # besides 0.
' If you want a queue of 20 using a mono VGA system:
'
' Dummy = Snatch (Saved%(), 20, 1, 0, 0, 0)
'
'----> Now, on with the works.
'
' Next, you pass the address of the screen to save:
' startX, startY, endX, endY
' i.e.: 1, 1, 80, 25
' that will save the whole screen (assuming it is 80x25)
'
' Last, you pass the function, either "Save," "Rest," "Move," or "MoveKeep."
' Use SAVE to store the screen, Rest to restore the screen. You do
' not have to pass the screen co-ordinates during in REST. It is
' automatically stored.
'
' Since SNATCH is a function, it will return TRUE if sucessful, FALSE if not
'
' Have fun with this ULTRA-FAST save/restore routine!!!!